package com.lxj.fast_android_demo.ui.adapter.holder;

import java.util.HashMap;

import android.view.View;
import android.widget.TextView;

import com.lxj.fast_android_demo.R;

/**
 * 列表的row的数据辅助类
 * 
 * @author LiangXiangJu
 * @creationTime 2014-6-27 下午2:37:27
 * @version
 */
public class TableHolder {

	public TableHolder(View convertView) {
		convertView.setTag(this);
	}

	public void fillData(int position, HashMap<String, Object> map, View view) {
		TextView tvItem1 = (TextView) view.findViewById(R.id.tvItem1);
		TextView tvItem2 = (TextView) view.findViewById(R.id.tvItem2);
		TextView tvItem3 = (TextView) view.findViewById(R.id.tvItem3);
		TextView tvItem4 = (TextView) view.findViewById(R.id.tvItem4);
		TextView tvItem5 = (TextView) view.findViewById(R.id.tvItem5);
		TextView tvItem6 = (TextView) view.findViewById(R.id.tvItem6);
		TextView tvItem7 = (TextView) view.findViewById(R.id.tvItem7);

		tvItem1.setText(String.valueOf(map.get("empName")));
		tvItem2.setText(String.valueOf(map.get("empAge")));
		tvItem3.setText(String.valueOf(map.get("empGender")));
		tvItem4.setText(String.valueOf(map.get("memo")));
		tvItem5.setText(String.valueOf(map.get("factor1")));
		tvItem6.setText(String.valueOf(map.get("factor2")));
		tvItem7.setText(String.valueOf(map.get("result")));
	}
}
